#pragma once 
#ifndef CSPRITE_H_
#define CSPRITE_H_

#include <d3d9.h>
#include <d3dx9.h>
#include <string>

#include "macros.h"

class CSprite{
private:
	D3DXIMAGE_INFO imginfo;
	LPDIRECT3DTEXTURE9 texture;
public:
	
	int ImgWidth;
	int ImgHeight;
	int SpriteWidth;
	int SpriteHeight;
	D3DXVECTOR3 SpriteCenter;
	int numOfFrames;
	int AnimationSpeed;
	int AnimationStep;
	int AnimationCount;

	CSprite(LPDIRECT3DDEVICE9 _device,  LPCWSTR _filename, int _frames, int _speed);
	CSprite(LPDIRECT3DDEVICE9 _device,  LPCWSTR _filename, int _frames, int _speed, D3DCOLOR _transparency);
	CSprite(LPDIRECT3DDEVICE9 _device,  LPCWSTR _filename, int _xframes, int _yframes, int _speed, D3DCOLOR _transparency);
	~CSprite();

	LPDIRECT3DTEXTURE9 GetTexture(){ return texture; };
};

#endif